package com.ihr360.insurance.model.dto.benefits.embeddable;


import com.ihr360.commons.model.type.RoundType;
import com.ihr360.insurance.model.dto.benefits.IBenefitPaymentConfig;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;

/**
 * 个人缴纳配置
 */
@Embeddable
public class PersonPaymentConfig implements IBenefitPaymentConfig {
    private static final long serialVersionUID = -3217576832908632000L;

    /**
     * 基数上限
     */
    private int personBaseMin;

    /**
     * 基数下限
     */
    private int personBaseMax;

    /**
     * 比例
     */
    private int personRatio;

    /**
     * 固定金额
     */
    private int personAmount;

    /**
     * 小数规则
     */
    @Column(length = 20, nullable = false)
    @Enumerated(EnumType.STRING)
    private RoundType personRoundType = RoundType.ROUND;

    /**
     * 小数位数
     */
    private int personRoundBit;

    public int getPersonBaseMin() {
        return personBaseMin;
    }

    public void setPersonBaseMin(int personBaseMin) {
        this.personBaseMin = personBaseMin;
    }

    public int getPersonBaseMax() {
        return personBaseMax;
    }

    public void setPersonBaseMax(int personBaseMax) {
        this.personBaseMax = personBaseMax;
    }

    public int getPersonRatio() {
        return personRatio;
    }

    public void setPersonRatio(int personRatio) {
        this.personRatio = personRatio;
    }

    public int getPersonAmount() {
        return personAmount;
    }

    public void setPersonAmount(int personAmount) {
        this.personAmount = personAmount;
    }

    public RoundType getPersonRoundType() {
        return personRoundType;
    }

    public void setPersonRoundType(RoundType personRoundType) {
        this.personRoundType = personRoundType;
    }

    public int getPersonRoundBit() {
        return personRoundBit;
    }

    public void setPersonRoundBit(int personRoundBit) {
        this.personRoundBit = personRoundBit;
    }

    @Override
    public int getBaseMin() {
        return getPersonBaseMin();
    }

    @Override
    public int getBaseMax() {
        return getPersonBaseMax();
    }

    @Override
    public int getRatio() {
        return getPersonRatio();
    }

    @Override
    public int getAmount() {
        return getPersonAmount();
    }

    @Override
    public RoundType getRoundType() {
        return getPersonRoundType();
    }

    @Override
    public int getRoundBit() {
        return getPersonRoundBit();
    }

//    @Override
//    public void setBaseMin(int baseMin) {
//        setPersonBaseMin(baseMin);
//    }
//
//    @Override
//    public void setBaseMax(int baseMax) {
//        setPersonBaseMax(baseMax);
//    }
//
//    @Override
//    public void setRatio(int ratio) {
//        setPersonRatio(ratio);
//    }
//
//    @Override
//    public void setAmount(int amount) {
//        setPersonAmount(amount);
//    }
//
//    @Override
//    public void setRoundType(RoundType roundType) {
//        setPersonRoundType(roundType);
//    }
//
//    @Override
//    public void setRoundBit(int roundBit) {
//        setPersonRoundBit(roundBit);
//    }
}
